﻿@model HanGu.Entity.MemberInfo
@{
    ViewBag.Title = "我的汉古";
    Layout = "~/Views/Shared/Main.cshtml";
    TempData["sidecalss"] = "EveryDayWisdom";

    TempData["TitlePic"] = Model.PicPath.Replace("_B.", "_S.");
    TempData["ContorlID"] = "Introduction";
    TempData["Remark"] = Model.Introduction;
    TempData["GropName"] = Model.GUID;
    var SexList = ViewData["SexList"] as SelectList;
    var IsMarryList = ViewData["IsMarry"] as SelectList;
    var ProviceList = ViewData["Provice"] as SelectList;
    var CityList = ViewData["City"] as SelectList;
    var NativePlaceList = ViewData["NativePlace"] as SelectList;
    var JobList = ViewData["Job"] as SelectList;
    var TradeList = ViewData["Trade"] as SelectList;
    var InterestList = ViewData["Interest"] as SelectList;
    List<string> InterestArry = new List<string>();
    if (Model.Interest != null)
    { InterestArry.AddRange(Model.Interest.Split(',')); }
    var MemberGrade = ViewData["MemberGrade"] as SelectList;
    var Degree = ViewData["Degree"] as SelectList;

    var ChangeCharges = ViewData["ChangeCharge"] as List<HanGu.Entity.VChangeChargeRecorde>;//充值积分
    var ChangeGrades = ViewData["ChangeGrade"] as List<HanGu.Entity.VChangeGradeRecorde>;//学位变更
    var ChargeProducts = ViewData["ChargeProduct"] as List<HanGu.Entity.VChargeRecorde>;//兑换产品

}
@section Header
{
    <style>
        .contentLeft
        {
            width: 100%;
        }
        #partContent
        {
            width: 100%;
        }
        .movieContain
        {
            width: 100%;
            margin-top: 5px;
        }
    </style>
}
@section Banner
{
    @Html.Partial("Banner")
}
@section Content{
    <div class="contentLeft">
        <table cellpadding="0" cellspacing="0" id="partContent" style="height: 100%;">
            <tr>
                <td>
                    <div class="ContentTitle">
                        <div class="ContentTitleLeft">
                            <img src="/Content/images/vipmyhanguTitle.gif" width="145" height="26" alt=""></div>
                        <div class="ContentTitleRight">
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="content">
                    <div class="contentLeft" style="height: 550px; width: 150px; background-color: #ccc">
                        @Html.Partial("vipLeftMenu")
                    </div>
                    <div class="contentLeft MyInfo" style="height: 100%; width: 500px; margin-left: 20px;">
                        <p>
                            @Model.RealName，您好！
                        </p>
                        <p>
                            <label>
                                您当前的积分：</label>
                            @Model.Charge<img src="/Content/images/money.png" />
                        </p>
                        <p>
                            <label>
                                您当前的学位：</label>
                            @Degree.SingleOrDefault(c => c.Value == Model.Degree).Text
                        </p>
                        <p>
                            <label>
                                您当前的级别：</label>
                            @MemberGrade.SingleOrDefault(c => c.Value == Model.Grade).Text
                        </p>
                        @* <p>
                            <label>
                                账号：</label>
                            @Model.UserName
                        </p>*@
                        <p style="padding-bottom: 0px;">
                            <label>
                                充值积分记录：</label>
                            <table cellpadding="3" cellspacing="0" style="padding-top: 0px; padding-left: 100px;">
                                @foreach (var item in ChangeCharges)
                                {
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <span formatdate="yyyy年MM月dd日 hh时mm分">@item.ChangeTime</span>
                                        </td>
                                        <td style="padding-left: 5px; padding-right: 5px">
                                            <span>购买积分</span>
                                        </td>
                                        <td style="text-align: right;">@item.ChangeValue.ToString("D")
                                        </td>
                                        <td>
                                            &nbsp;<img src="/Content/images/money.png" />
                                        </td>
                                    </tr>
                                }
                            </table>
                        </p>
                        <p style="padding-bottom: 0px;">
                            <label>
                                兑换积分记录：</label>
                            <table cellpadding="3" cellspacing="0" style="padding-top: 0px; padding-left: 100px;">
                                @foreach (var item in ChargeProducts)
                                {
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <span formatdate="yyyy年MM月dd日 hh时mm分">@item.ChangeTime</span>
                                        </td>
                                        <td style="padding-left: 5px; padding-right: 5px">
                                            <span>兑换积分</span>
                                        </td>
                                        <td style="text-align: right;">@item.ChangeValue.ToString("D")
                                        </td>
                                        <td>
                                            &nbsp;<img src="/Content/images/money.png" />
                                        </td>
                                    </tr>
                                }
                            </table>
                        </p>
                        <p style="padding-bottom: 0px;">
                            <label>
                                学位记录：</label>
                            <table cellpadding="3" cellspacing="0" style="padding-top: 0px; padding-left: 100px;">
                                @foreach (var item in ChangeGrades)
                                {
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <span formatdate="yyyy年MM月dd日 hh时mm分">@item.ChangeTime</span>
                                        </td>
                                        <td style="padding-left: 5px; padding-right: 5px">
                                            <span>@item.ChangeReason</span>
                                        </td>
                                        <td>成为 @Degree.SingleOrDefault(c => c.Value == item.ChangeValue).Text
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                }
                            </table>
                        </p>
                    </div>
                </td>
            </tr>
        </table>
    </div>
}
@section Side{
    @Html.Partial("Side")
}
<script>
    function getValidateCode() {
        $.ajax({
            type: "POST",
            url: "/vip/login",
            data: "User=" + User + "&Pwd=" + Pwd + "&code=" + code,
            success: function (data) {
                var json = eval("(" + data + ")");
                if (json.statusCode == 200) {
                    window.location = '@Url.Action("index", "vip")';
                }
                else {
                    alert(json.message);
                }
            }
        });

    }
    $(function () { $("#registerForm").validate(); });
</script>
